package com.user.dao;

import com.user.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import java.util.List;

@Mapper
public interface UserDao {

    @Select("select * from user where userName = #{userName} and passWord = #{passWord}")
    List<User> select(User user);

    @Insert("insert into user(username,password,delivery_address,phone_number) " +
            "values (#{userName},#{passWord},#{delivery_address},#{phone_number})")
    int insert(User user);
}
